﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KeyWordSearch.TreeParser;

namespace KeyWordSearch.ProcessTree
{
	public class RecognizationException:System.ApplicationException
	{
		internal RecognizationException(string message, Token token)
			: base(message)
		{
			Index = token.TextElementIndex;
			Length = token.TextElementLength;
			TextSource = token.TextValue;
		}

		public int Index
		{
			get;
			private set;
		}

		public int Length
		{
			get;
			private set;
		}

		public string TextSource
		{
			get;
			private set;
		}

	}
}
